package com.qg.controller;


import com.qg.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import pojo.User;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping(value = "/api")
public class UserController {
    @Resource
    private UserService userService;
    @RequestMapping(value = "/getLogin",method = RequestMethod.POST)
    public String getLogin(@RequestParam("userName") String userName,@RequestParam("passWord") String passWord){
//        User user=new User();
//        user.setUserName(userName);
//        user.setPassWord(passWord);
        Map<String,Object> param=new HashMap<>();
        param.put("userName",userName);
        param.put("passWord",passWord);
        return userService.Login(param);
    }
}
